
#pragma once

#include "./ecs.hpp"
#include "./plugin.hpp"
#include "./time.hpp"
#include "./utils.hpp"

namespace qbe::ecs {

void init_timer(World& w);
void update_timer(Resource<Time> time);
void init_default_schedules(App& app);

class DefaultPlugin : public Plugin {

 public:
  /// @brief Build the Default Plugin
  void build(App& app) {
    init_default_schedules(app);
    // app.add_event<AppExit>();
    app.add_systems<stage::PostStartup>(init_timer);
    app.add_systems<stage::First>(update_timer);
  };
};
}  // namespace qbe::ecs
